package jaux.tank.generator.util;

public class NumberUtil {

	private NumberUtil() {
	}
	
	public static Integer getInteger(Object obj) {
		if(obj == null) {
			return null;
		}
		if(obj instanceof Integer) {
			return (Integer)obj;
		}
		return Integer.valueOf(obj.toString());
	}
	
	public static Double getDouble(Object obj) {
		if(obj == null) {
			return null;
		}
		if(obj instanceof Double) {
			return (Double)obj;
		}
		return Double.valueOf(obj.toString());
	}
}
